﻿<%@ Page Title="Change Password" Language="C#" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs"
    Inherits="Churchtoolkit.Web.ChangePassword" MasterPageFile="~/Shared/DefaultMaster.master" %>

<asp:Content ID="Password" ContentPlaceHolderID="DefaultContent" runat="server">
    <h3>
        Change Your Password 
    </h3>
    <table class="Details" cellspacing="0" cellpadding="5">
        <tr>
            <td class="label">
                Old Password:
            </td>
            <td>
                <asp:TextBox ID="txtOldPassword" runat="server" TextMode="Password" />
                <asp:RequiredFieldValidator ID="vldOldPassword" runat="server" ControlToValidate="txtOldPassword" Text="*" ErrorMessage="0001"></asp:RequiredFieldValidator>
                <asp:CustomValidator Text="*" runat="server" Display="Dynamic"  ControlToValidate="txtOldPassword" ErrorMessage="0002"
                    onservervalidate="oldPassword_ServerValidate"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td  class="label">
                New Password:
            </td>
            <td>
                <asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" />
                <asp:RequiredFieldValidator ID="PasswordRequiredValidator" runat="server" ControlToValidate="txtNewPassword" Text="*"
                    Display="Static" ErrorMessage="0001" />
            </td>
        </tr>
        <tr>
            <td class="label">
                Confirm New Password:
            </td>
            <td>
                <asp:TextBox ID="txtPasswordConfirm" runat="server" TextMode="Password" />
                <asp:RequiredFieldValidator ID="ConfirmValidator" runat="server" ControlToValidate="txtPasswordConfirm"
                    Display="Dynamic" Text="*" ErrorMessage="0001" />
                 <asp:CompareValidator ID="PasswordCompareValidator" runat="server" ControlToValidate="txtPasswordConfirm"
                Display="Dynamic" ControlToCompare="txtNewPassword" Text="*" ErrorMessage="0007" />
            </td>
          
        </tr>
        <tr>
            <td colspan="2" class="footer">
                <table width="100%">
                <tr>
                    <td>
                        <asp:ValidationSummary  runat="server" />
                    </td>
                    <td align="right" valign="top">
                        <asp:Button runat="server" ID="ChangeBtn" CssClass="button" Text="Change Password" OnClick= "ChangeOldPassword"/>    
                    </td>
                </tr>
            </table>
            </td>
        </tr>
    </table>
</asp:Content>
